package com.xcl.dao.imp;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;



public class SignDao {
	static{
		try {
			Class.forName("com.mysql.jdbc.Driver");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
	}
	public boolean addoperate(String num,String pass) {
		int result=0;
		try {
			
			Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/xiaocilang", "root", "123456");
			
			PreparedStatement pst=conn.prepareStatement("insert into admin values(?,?)");
			System.out.println(num);
			
			pst.setString(1, num);
			pst.setString(2, pass);
			result=pst.executeUpdate();
		} catch (SQLException e) {
			e.printStackTrace();
		}			
		
		
		
		return result>0;
		}
}
